package com.test.testauth.demos.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RefreshScope
public class BasicController {
    private static final Logger log = LoggerFactory.getLogger(BasicController.class);
    @Value("${auth}")
    private String auth;

    @RequestMapping("/auth")
    @ResponseBody
    public String hello() {

        log.error("=============error-msg");
        log.warn("=============warn-msg");
        return "auth====>" + auth;
    }
}
